package com.dk.pojo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.time.LocalDateTime;


import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;


/**
 * <p>
 * 
 * </p>
 *
 * @author author
 * @since 2022-07-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
//@Accessors(chain = true)
@TableName("users")
public class Users implements Serializable {

    private static final long serialVersionUID = 1L;

    @ExcelIgnore
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 用户名
     */
    @ApiModelProperty(value = "用户名")
    @ExcelProperty("用户名")
    @TableField("username")
    private String username;

    /**
     * 密码
     */
    @ApiModelProperty(value = "密码")
    @ExcelProperty("密码")
    @TableField("password")
    private String password;

    /**
     * 性别
     */
    @ApiModelProperty(value = "性别")
    @ExcelProperty("性别")
    @TableField("sex")
    private Integer sex;

    /**
     * 姓名
     */
    @ApiModelProperty(value = "姓名")
    @ExcelProperty("姓名")
    @TableField("name")
    private String name;

    /**
     * 电话
     */
    @ApiModelProperty(value = "电话")
    @ExcelProperty("电话")
    @TableField("tele")
    private String tele;

    /**
     * 邮箱
     */
    @ApiModelProperty(value = "邮箱")
    @ExcelProperty("邮箱")
    @TableField("emil")
    private String emil;

    @ExcelProperty("创建时间")
    @TableField("maketime")
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")


    private LocalDateTime maketime;
    @ExcelProperty("状态")
    @ApiModelProperty(value = "状态")
    @TableField("stat")
    private String stat;

    @Override
    public String toString() {
        return "{" +
                "'id'=" + id +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", sex=" + sex +
                ", name='" + name + '\'' +
                ", tele='" + tele + '\'' +
                ", emil='" + emil + '\'' +
                ", maketime=" + maketime +
                ", stat='" + stat + '\'' +
                '}';
    }
}
